package controller;

import server.HttpServlet;
import server.HttpServletRequest;
import server.HttpServletResponse;

//请求发送给服务器，服务器需要绑蔓找到执行资源
//当前类中的方法
public class IndexController extends HttpServlet {

    @Override
    public void service(HttpServletRequest request, HttpServletResponse response) {
        System.out.println(request.getParameter("name"));
        System.out.println(request.getParameter("pass"));

        //将响应信息交给response对象存储
        //response.write(request.getParameter("name") + "<br>" + request.getParameter("pass"));
        //如果想要真正浏览器看到信息，就要遵循浏览器识别的规则<html>
        /*response.write("HTTP1.1 200 OK\r\n");
        response.write("Content-Type: text/html;charset=UTF-8\r\n");
        response.write("\r\n");
        response.write("<html>");
        response.write("<body>");
        response.write("<input type='button' value='按钮'>");
        response.write("<body>");
        response.write("<html>");*/
    }
}
